﻿using System;
using System.ComponentModel.DataAnnotations;
using YFurion.Application;

namespace MultiTenant.Application
{
    public class TenantDto : EntityDto
    {
        /// <summary>
        /// 租户名
        /// </summary>
        [Required, MaxLength(128)]
        public virtual string Name { get; set; }

        /// <summary>
        /// 租户类型(0-Id隔离;1-数据库隔离;)
        /// </summary>
        [Range(0, 2)]
        public byte Type { get; set; }

        /// <summary>
        /// 来源主机地址
        /// </summary>
        [MaxLength(256)]
        public virtual string Host { get; set; }

        /// <summary>
        /// 电子邮箱
        /// </summary>
        [EmailAddress, MaxLength(256)]
        public virtual string EmailAddress { get; set; }

        /// <summary>
        /// 手机号码
        /// </summary>
        [Phone, MaxLength(32)]
        public virtual string PhoneNumber { get; set; }

        /// <summary>
        /// 数据库链接字符串
        /// </summary>
        [MaxLength(256)]
        public virtual string ConnectionString { get; set; }
    }
}
